<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/common/taglibs.jsp" %>
<script type="text/javascript">
<!--
$(document).ready(function(){
	var editable = ${editable};
	if(!editable){
		  alertMsg.error('对不起，不能修改别人创建的文档！',{okCall:function(){
			  navTab.closeCurrentTab();
			  }});
		
		}
});
//-->
</script>
<div class="page">
	<div class="pageContent">
		<form method="post" id="documentInfo" action="${ctx }/crm/document!save.action" enctype="multipart/form-data" class="pageForm required-validate" onsubmit="return iframeCallback(this,navTabAjaxDone);">
			<input type="hidden" name="id" id="id" value="${id}"/>
			<input type="hidden" name="mustdepart" id="mustdepart" value="1"/>
			<input type="hidden" name="navTabId" value="docList"/>
			<div class="pageFormContent" layoutH="56">
				<p>
					<label>文档标题：</label>
					<input name="title"  id="title" type="text" size="30" alt="" class="required" value="${title}" />
				</p>
				<p>
					<label>文档摘要：</label>
					<input name="summary" type="text" value="${summary}" size="30" class="required"/>
				</p>
				<p>
					<label>创建者：</label>
					<s:if test="creatorid!=null">
					<input name="creatorid" type="hidden" value="${creatorid}" readonly="readonly" size="30" />
					<input name="creator" type="text" value="${creator}" readonly="readonly" size="30" />
					</s:if>
					<s:else>
					<input name="creatorid" type="hidden" value="${currUser.id}" readonly="readonly" size="30" />
					<input name="creator" type="text" value="${currUser.name}" readonly="readonly" size="30" />
					</s:else>
				</p>
				<p>
					<label>文档分类：</label>
					<input name="categoryid" id="categoryid" type="hidden" size="30" value="${category.id}" />
					<input type="text" name="categoryName" id="categoryName"  value="${category.name}" size="30" readonly="true" class="required"/>
					<a class="inputButton" href="${ctx }/common/sys-type-ui!getSysClassUL.action?code=DOCUMENT_TYPE&leafNode=true&idInput=categoryid&nameInput=categoryName&form=documentInfo&dlgID=documentLevelDlgtype&cascadeName=false" target="dialog" rel="documentLevelDlgtype">选择类型</a>
				</p>
				<p>
					<label>私密类型：</label>
					<input name="doctypeid" id="doctypeid" type="hidden" size="30" value="${doctype.id}" />
					<input type="text" name="doctypeName" id="doctypeName"  value="${doctype.name}" size="30" readonly="true" class="required"/>
					<a class="inputButton" href="${ctx }/common/sys-type-ui!getSysClassUL.action?code=DOC_PRIVATE&leafNode=true&idInput=doctypeid&nameInput=doctypeName&form=documentInfo&dlgID=documentDoctypeDlgtype&cascadeName=false" target="dialog" rel="documentDoctypeDlgtype">选择类型</a>
				</p>
				<p>
					<label>所属部门：</label>
					<input type="hidden" id="departid" name="departid" size="40" value="${depart.id}"/>
					<input type="text"  id="departName" name="departName"  value="${depart.name}" class="required" size="30"  class="required"/>
					<a class="inputButton" href="${ctx }/common/organization-ui!getOrgUL.action?code=ROOT&idInput=departid&nameInput=departName&form=documentInfo&dlgID=documentDlgOrg" target="dialog" rel="documentDlgOrg">选择部门</a>
				</p>
				<p>
					<label>上传文档：</label>
					<input type="file" name="file" id="file" class="multi" accept="zip|rar|doc|txt|docx|jpg|gif|jpeg"/>
				</p>
				<p>
					<label>上传文档2：</label>
					<input type="file" name="file" id="file" class="multi" accept="zip|rar|doc|txt|docx|jpg|gif|jpeg"/>
				</p>
			</div>
			<div class="formBar">
				<ul>
					<li>
						<div class="buttonActive"><div class="buttonContent"><button type="submit">保存</button></div></div>
					</li>
					<li>
						<div class="button"><div class="buttonContent"><button type="Button" onclick="navTab.closeCurrentTab()">取消</button></div></div>
					</li>
				</ul>
			</div>
		</form>
	</div>
</div>